import instance from "../utils/axios_config.js";

export {getOrderDetailPage, searchOrder, cancelOrder, refundOrder}
// 查询列表页接口
const getOrderDetailPage = (params) => {
    return instance({
        url: '/order/list',
        method: 'get',
        params
    })
}

// 按条件查询订单
const searchOrder = (params) => {
    return instance({
        url: '/order/search',
        method: 'get',
        params
    })
}

//取消订单
const cancelOrder = (id) => {
    return instance({
        url: `/order/${id}`,
        method: 'put'
    })
}

//订单退款
const refundOrder = (id) => {
    return instance({
        url: `/order/refund/${id}`,
        method: 'put'
    })
}

